<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>首页 - 个人选股系统 V5.87</title>
    <link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/jquery.pagination.css') }}" rel="stylesheet">
    <script src="{{ url_for('static', filename='js/jquery-1.12.4.min.js')}}"></script>
    <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
    <script type="text/javascript" src="../../static/js/jquery.pagination.min.js"></script>
</head>

<body>
<div class="navbar navbar-inverse navbar-static-top ">
        <div class="container">
        <div class="navbar-header">
                <button class="navbar-toggle" data-toggle="collapse" data-target="#mymenu">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                 </button>
                 <a href="#" class="navbar-brand">选股系统</a>
        </div>
        <div class="collapse navbar-collapse" id="mymenu">
                <ul class="nav navbar-nav">
                        <li class="active"><a href="">股票信息</a></li>
                        <li><a href="center">个人中心</a></li>
                </ul>
        </div>
        </div>
</div>
<div class="container">

    {% for message in get_flashed_messages() %}
        {{ message }}
    {% endfor %}


    <div class="container-fluid">

        <table class="table table-hover">
        <tbody>
            <tr>
                    <th>序号</th>
                    <th>股票代码</th>
                    <th>股票简称</th>
                    <th>涨跌幅</th>
                    <th>换手率</th>
                    <th>最新价(元)</th>
                    <th>前期高点</th>
                    <th>前期高点日期</th>
                    <th>添加关注</th>
            </tr>
                {% for i in data.news %}
            <tr>
                <td>{{ i.id }}</td>
                <td>{{ i.code }}</td>
                <td>{{ i.short }}</td>
                <td>{{ i.chg }}</td>
                <td>{{ i.turnover }}</td>
                <td>{{ i.price }}</td>
                <td>{{ i.highs }}</td>
                <td>{{ i.time }}</td>
                <td><a href="add_focus/{{ i.id }}">添加</a></td>
            </tr>
                {% endfor %}

            <div class="box">
                <div id="pagination" class="page"></div>
            </div>

            <script>
                $(function() {
                    $("#pagination").pagination({
                        currentPage: {{ data.current_page }},
                        totalPage: {{ data.total_page }},
                        callback: function(current) {
                            window.location.href = "/?page=" + current
                        }
                    });
                });
            </script>

        </tbody>
        </table>
    </div>
</div>
</body>
</html>            
